﻿<!--
<copyright company="Christoph van der Fecht - VDsoft">
Copyright (C) Christoph van der Fecht - VDsoft - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited,
unless it is communicated and authorized by the copyright owner.
</copyright>
-->
<Window x:Class="SeriesManager.OptionsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:system="clr-namespace:System;assembly=mscorlib"
		xmlns:enums="clr-namespace:SeriesManager.Model"
        Title="Options" 
		Height="300" 
		Width="300"
		MinWidth="300"
		MinHeight="300"
		x:Name="OptionsDialog"
		WindowStyle="ToolWindow"
		WindowStartupLocation="CenterScreen"
		DataContext="{Binding Source={StaticResource ResourceKey=Locator}, Path=OptionDialog}">
	
	<Window.Resources>
		<ObjectDataProvider x:Key="NameConventionProvider"
							MethodName="GetValues"
							ObjectType="{x:Type system:Enum}">
			<ObjectDataProvider.MethodParameters>
				<x:Type TypeName="enums:NamingConventions"/>
			</ObjectDataProvider.MethodParameters>
		</ObjectDataProvider>
		<Style x:Key="ButtonStyle" TargetType="Button">
			<Setter Property="Width" Value="80"/>
			<Setter Property="Margin" Value="5"/>
		</Style>
	</Window.Resources>
	
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="8*"/>
			<RowDefinition Height="1*"/>
		</Grid.RowDefinitions>
		<TabControl Grid.Row="0">
			<TabItem Header="Banner Options"
					 DataContext="{Binding Source={StaticResource ResourceKey=Locator}, Path=BannerSettings}">
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="1*"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>
					<TextBlock Text="Naming Convention"
							   Margin="5"
							   Grid.Row="0"/>
					<ComboBox ItemsSource="{Binding Source={StaticResource NameConventionProvider}}"
							  SelectedValue="{Binding Path=SelectedNamingConvention}"
							  MaxHeight="24"
							  Margin="5,20,80,50"
							  Grid.Row="0"/>
				</Grid>
			</TabItem>
		</TabControl>
		<StackPanel Orientation="Horizontal"
					HorizontalAlignment="Right"
					Grid.Row="1">
			<Button Content="Save"
					Command="{Binding Path=SaveSettingsCommand}"
					Style="{StaticResource ResourceKey=ButtonStyle}"/>
			<Button Content="Cancel"
					Command="{Binding Path=CancelCommand}"
					CommandParameter="{Binding ElementName=OptionsDialog}"
					Style="{StaticResource ResourceKey=ButtonStyle}"/>
		</StackPanel>
    </Grid>
</Window>
